package com.kun.portal.webframe.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.repository.*;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import javax.persistence.Temporal;
import java.io.Serializable;
import java.security.PrivateKey;
import java.util.Date;

/**
 * 车辆派遣管理
 * Created by Administrator on 2018/5/9.
 *
 */
@Entity
@Table(
        name = "fbo_vehicle"
)
public class VehicleDispatchPo implements Serializable {
    @Id
    @GeneratedValue(generator = "dispatch_id")
    @GenericGenerator(name = "dispatch_id", strategy = "uuid")
    @Column(name = "dispatch_id", length = 32, nullable = false)
    private String dispatchId;//ID


    public String getOddNumber() {
        return oddNumber;
    }

    public void setOddNumber(String oddNumber) {
        this.oddNumber = oddNumber;
    }

    @Column(name = "odd_number", length = 20)
    private String oddNumber ;//单号

    @Column(name = "transport_department", length = 100)
    private String  transportDepartment;//用车公司及部门

    @Column(name = "proposer", length = 30)
    private String  proposer;//申请人

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Column(name = "car_date", length = 100)
    @Temporal(TemporalType.TIMESTAMP)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone="Asia/Shanghai")
    private Date carDate;//出车日期

    @Column(name = "start_kilometre", length = 30)
    private Double startKilometre;//出发公里数

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Column(name = "return_time", length = 100)
    @Temporal(TemporalType.TIMESTAMP)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone="Asia/Shanghai")
    private Date returnTime;//返回时间

    @Column(name = "return_kilometre", length = 30)
    private Double returnKilometre;//返回公里数

    @Column(name = "toll", length = 30)
    private Double toll;//通行费

    @Column(name = "driver", length = 30)
    private String driver;//驾驶人员

    @Column(name = "transport_people", length = 30)
    private String transportPeople;//接送人员

    @Column(name = "car_number", length = 30)
    private String carNumber;//车牌号

    @Column(name = "oil_mass", length = 30)
    private Double oilMass;//核定耗油量

    @Column(name = "oil_money", length = 30)
    private Double oilMoney;//可报销加油金额

    public String getDispatchId() {
        return dispatchId;
    }

    public void setDispatchId(String dispatchId) {
        this.dispatchId = dispatchId;
    }

    public String getTransportDepartment() {
        return transportDepartment;
    }

    public void setTransportDepartment(String transportDepartment) {
        this.transportDepartment = transportDepartment;
    }

    public String getProposer() {
        return proposer;
    }

    public void setProposer(String proposer) {
        this.proposer = proposer;
    }

    public Date getCarDate() {
        return carDate;
    }

    public void setCarDate(Date carDate) {
        this.carDate = carDate;
    }

    public Double getStartKilometre() {
        return startKilometre;
    }

    public void setStartKilometre(Double startKilometre) {
        this.startKilometre = startKilometre;
    }

    public Date getReturnTime() {
        return returnTime;
    }

    public void setReturnTime(Date returnTime) {
        this.returnTime = returnTime;
    }

    public Double getReturnKilometre() {
        return returnKilometre;
    }

    public void setReturnKilometre(Double returnKilometre) {
        this.returnKilometre = returnKilometre;
    }

    public Double getToll() {
        return toll;
    }

    public void setToll(Double toll) {
        this.toll = toll;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getTransportPeople() {
        return transportPeople;
    }

    public void setTransportPeople(String transportPeople) {
        this.transportPeople = transportPeople;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }

    public Double getOilMass() {
        return oilMass;
    }

    public void setOilMass(Double oilMass) {
        this.oilMass = oilMass;
    }

    public Double getOilMoney() {
        return oilMoney;
    }

    public void setOilMoney(Double oilMoney) {
        this.oilMoney = oilMoney;
    }
}
